import { createApp } from 'vue'
import { createPinia } from 'pinia';
import './style.css'
import App from './App.vue'
import router from './router';
// import FcDesigner from '@form-create/designer'
import ELEMENT from 'element-plus';
import zhCn from 'element-plus/es/locale/lang/zh-cn'; 
import 'element-plus/dist/index.css';
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
// app.use(ELEMENT).use(FcDesigner).use(FcDesigner.formCreate).use(router).mount('#app')
import 'vform3-builds/dist/designer.style.css'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import VForm3 from 'vform3-builds'  //引入VForm3库
import VFormRender from 'vform3-builds/dist/render.umd.js' 
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)   

// createApp(App).use(ELEMENT).use(FcDesigner).use(FcDesigner.formCreate).use(pinia).use(router).mount('#app')
app.use(ELEMENT,{locale: zhCn}).use(VForm3).use(VFormRender).use(pinia).use(router).mount('#app')
